<%@ page import="org.ikastola.Service" %>


<g:javascript src="jquery.multiselect.filter.js" />
<g:javascript src="jquery.multiselect.js" />
<script type="text/javascript">
	$(document).ready(function() {
		$("#items").multiselect().multiselectfilter();
	});
</script>

<div class="fieldcontain ${hasErrors(bean: serviceInstance, field: 'items', 'error')} ">
	<label for="items">
		<g:message code="service.items.label" default="Items" />
		
	</label>
	<g:select name="items" optionValue="${{it.name}}" from="${org.ikastola.Item.list()}" multiple="multiple" optionKey="id" size="5" value="${serviceInstance?.items*.id}" class="many-to-many"/>
</div>

<div class="fieldcontain ${hasErrors(bean: serviceInstance, field: 'lastpayment', 'error')} required">
	<label for="lastpayment">
		<g:message code="service.lastpayment.label" default="Lastpayment" />
		<span class="required-indicator">*</span>
	</label>
	<g:datePicker name="lastpayment" precision="day"  value="${serviceInstance?.lastpayment}"  />
</div>

<div class="fieldcontain ${hasErrors(bean: serviceInstance, field: 'nextduedate', 'error')} required">
	<label for="nextduedate">
		<g:message code="service.nextduedate.label" default="Nextduedate" />
		<span class="required-indicator">*</span>
	</label>
	<g:datePicker name="nextduedate" precision="day"  value="${serviceInstance?.nextduedate}"  />
</div>

